package com.chen.recruit.domain.dto;

import cn.afterturn.easypoi.excel.annotation.Excel;
import cn.afterturn.easypoi.excel.annotation.ExcelCollection;
import com.chen.recruit.common.constants.SysConstants;
import com.chen.recruit.common.enums.CommonStatus;
import com.chen.recruit.common.enums.SexEnum;
import com.chen.recruit.common.enums.UserType;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.Date;
import java.util.List;

@Data
@ApiModel("UserDto 用户数据传输对象")
public class UserDto {

    @ApiModelProperty("用户id")
    private Integer id;

    @ApiModelProperty("院系id")
    private Integer collegeId;

    @ApiModelProperty("岗位id")
    private Integer postId;

    @ApiModelProperty("用户名")
    @Excel(name = "用户名", width = 20)
    private String username;

    @ApiModelProperty("密码")
    private String password;

    @ApiModelProperty("名称")
    @Excel(name = "名称", width = 20)
    private String name;

    @ApiModelProperty("邮箱")
    @Excel(name = "邮箱", width = 20)
    private String email;

    @ApiModelProperty("手机号")
    @Excel(name = "手机号", width = 20)
    private String phoneNumber;

    @ApiModelProperty("性别（1男 0女）")
    private SexEnum sex;

    @ApiModelProperty("用户头像")
    private String avatar;

    @ApiModelProperty("备注")
    @Excel(name = "备注", width = 20)
    private String remark;

    @ApiModelProperty("用户类型(0管理员 1企业 2学生)")
    @Excel(name = "用户类型", width = 20, enumExportField = SysConstants.ENUM_EXPORT_FIELD)
    private UserType type;

    @ApiModelProperty("用户状态（1启用 0禁用）")
    @Excel(name = "用户状态", width = 20, enumExportField = SysConstants.ENUM_EXPORT_FIELD)
    private CommonStatus status;

    @ApiModelProperty("上次登录时间")
    private Date lastLoginTime;

    @ApiModelProperty("登录时间")
    private Date loginTime;

    @ApiModelProperty("院系名称")
    @Excel(name = "所属院系", width = 20)
    private String collegeName;

    @ApiModelProperty("岗位名称")
    @Excel(name = "所属岗位", width = 20)
    private String postName;

    @ApiModelProperty("角色名称列表")
    @ExcelCollection(name = "角色名称列表")
    private List<String> roleNames;

    @ApiModelProperty("菜单权限列表")
    private List<String> menuPermissions;

}
